package com.tssm.action.usercenter;

import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.opensymphony.xwork2.ActionSupport;
import com.tssm.cache.memcached.TsSessionUtil;
import com.tssm.core.util.Pages;
import com.tssm.core.util.Picfiles;
import com.tssm.pojo.SarcInvestigation;
import com.tssm.pojo.SarcInvestigationCargo;
import com.tssm.pojo.SarcSupplier;
import com.tssm.service.SarcInvestigationService;
import com.tssm.pojo.SarcQuotationCargo;
import com.tssm.pojo.SarcRefer;
import com.tssm.service.SarcReferService;

@Controller("investigationAction")
@Scope("prototype")
public class InvestigationAction extends ActionSupport{

	private static final long serialVersionUID = 1L;
	@Resource
	private SarcInvestigationService sarcinvestigationService;
	@Resource
	private SarcReferService sarcReferService;
	//供应商
	private SarcSupplier ssup;
	//调查表
	private List<SarcInvestigation> sinvlist;
	private SarcInvestigation sinv;
	private Long id;
	private Long oid;
	private Long supplierid;
	private String code;
	private Date investigationTime;
	private String type;
	private String qualification;
	private String address;
	private String postcode;
	private String portal;
	private String pushType;
	private String payType;
	private Double imprest;
	private Long settlement;
	private String currency;
	private String transportType;
	private String legalPerson;
	private String contact;
	private String tel;
	private String fax;
	private String mobile;
	private String email;
	private String bank;
	private String bankAccount;
	private String taxCollector;
	private String property;
	private Double registerCapital;
	private Double fixedAssets;
	private Long employee;
	private Long management;
	private Long technical;
	private Long qc;
	private String groupOutput;
	private String supplyAbility;
	private String process;
	private String productionEquipment;
	private String detectionEquipment;
	private String getApprove;
	private String planApprove;
	private String approveStandard;
	private String approveReport;
	private Byte ifPushPurchasing;
	private Byte auditState;
	private Date auditTime;
	private String auditPerson;
	private String taxationCert;
	private File taxcert;
	private String taxcertFileName;
	private Date taxationEndtime;
	private String businessCert;
	private File buscert;
	private String buscertFileName;
	private Date businessEndtime;
	private String productCert;
	private File procert;
	private String procertFileName;
	private Date productEndtime;
	private String operateCert;
	private File opecert;
	private String opecertFileName;
	private Date operateEndtime;
	private String tdsCert;
	private Date tdsEndtime;
	private String msdsCert;
	private Date msdsEndtime;
	private String otherCert;
	private Date otherEndtime;
	private Date addTime;
	private Date modifyTime;
	private Date finishTime;
	private String def1;
	private String def2;
	private String def3;
	private String def4;
	private String def5;
	private String def6;
	private String def7;
	private String def8;
	private String def9;
	private Date ts;
	private Long dr;
	//评价表货物
	private List<SarcInvestigationCargo> sinvcargolist;
	private SarcInvestigationCargo sinvcargo;
	private String cargoName;
	private String cargoCode;
	private String cargoStandard;
	private String cargoSupplyCycle;
	//分页
	private Pages pages;
	private int currentPage;
	
	public String newInvestigation() {
		HttpServletRequest request = ServletActionContext.getRequest();
		ssup = TsSessionUtil.getTsUser(request);
		investigationTime = new Date();
		return "newInvestigation";
	}
	
	public String saveInvestigation() {
		HttpServletRequest request = ServletActionContext.getRequest();
		ssup = TsSessionUtil.getTsUser(request);
		sinv = new SarcInvestigation();
		sinv.setSupplierid(ssup.getSupplierid());
		sinv.setInvestigationTime(investigationTime);
		sinv.setType(type);
		sinv.setQualification(qualification);
		sinv.setAddress(address);
		sinv.setPostcode(postcode);
		sinv.setPortal(portal);
		sinv.setPushType(pushType);
		sinv.setPayType(payType);
		sinv.setImprest(imprest);
		sinv.setSettlement(settlement);
		sinv.setCurrency(currency);
		sinv.setTransportType(transportType);
		sinv.setLegalPerson(legalPerson);
		sinv.setContact(contact);
		sinv.setTel(tel);
		sinv.setFax(fax);
		sinv.setMobile(mobile);
		sinv.setEmail(email);
		sinv.setBank(bank);
		sinv.setBankAccount(bankAccount);
		sinv.setTaxCollector(taxCollector);
		sinv.setProperty(property);
		sinv.setRegisterCapital(registerCapital);
		sinv.setFixedAssets(fixedAssets);
		sinv.setEmployee(employee);
		sinv.setManagement(management);
		sinv.setTechnical(technical);
		sinv.setQc(qc);
		sinv.setGroupOutput(groupOutput);
		sinv.setSupplyAbility(supplyAbility);
		sinv.setProcess(process);
		sinv.setProductionEquipment(productionEquipment);
		sinv.setDetectionEquipment(detectionEquipment);
		sinv.setGetApprove(getApprove);
		sinv.setPlanApprove(planApprove);
		sinv.setApproveStandard(approveStandard);
		sinv.setApproveReport(approveReport);
		sinv.setIfPushPurchasing(ifPushPurchasing);
		if (!("").equals(taxcertFileName) && taxcertFileName != null) {
			taxationCert = Picfiles.getsrcpic(request, taxcertFileName,
					taxcert, "/upload/cert/", 1000);
			sinv.setTaxationCert(taxationCert);
		}
		if (!("").equals(buscertFileName) && buscertFileName != null) {
			businessCert = Picfiles.getsrcpic(request, buscertFileName,
					buscert, "/upload/cert/", 1000);
			sinv.setBusinessCert(businessCert);
		}
		if (!("").equals(procertFileName) && procertFileName != null) {
			productCert = Picfiles.getsrcpic(request, procertFileName,
					procert, "/upload/cert/", 1000);
			sinv.setProductCert(productCert);
		}
		if (!("").equals(opecertFileName) && opecertFileName != null) {
			operateCert = Picfiles.getsrcpic(request, opecertFileName,
					opecert, "/upload/cert/", 1000);
			sinv.setOperateCert(operateCert);
		}
//		sinv.setTdsCert(tdsCert);
//		sinv.setMsdsCert(msdsCert);
//		sinv.setOtherCert(otherCert);
		Byte suditstateByte = 0;
		sinv.setAuditState(suditstateByte);
		sinv.setDr(0L);
		sarcinvestigationService.saveOrUpdate(sinv);
		String scode = new SimpleDateFormat("yyyyMMdd").format(new Date());		
		int num = sinv.getInvestigationid().toString().length();
		if(num < 3) {
			for(int n = 0; n < (3 - num); n++)
				scode += "0";
			scode += sinv.getInvestigationid().toString();
		}else {
			scode += sinv.getInvestigationid().toString().substring(num - 3);
		}
		sinv.setCode(scode);
		sarcinvestigationService.saveOrUpdate(sinv);
		return "saveInvestigation";
	}
	
	public String editInvestigation() {
		HttpServletRequest request = ServletActionContext.getRequest();
		ssup = TsSessionUtil.getTsUser(request);
		sinv = sarcinvestigationService.getInvestigationById(id);
		pages = new Pages();
		pages.setAllNum(sarcinvestigationService.getInvestigationCargoListCount(sinv.getInvestigationid()));
		if(currentPage == 0) currentPage = 1;
		pages.setCurrentPage(currentPage);
		int pageSize = 10;
		pages.setPageSize(pageSize);
		int pageCount = pages.getPageCount();
		pages.setPageCount(pageCount);//总页数		
		int startIndex = (currentPage - 1) * pageSize;
		sinvcargolist = sarcinvestigationService.getInvestigationCargoList(sinv.getInvestigationid(), startIndex, pageSize);
		return "editInvestigation";
	}
	
	public String updateInvestigation() {
		HttpServletRequest request = ServletActionContext.getRequest();
		ssup = TsSessionUtil.getTsUser(request);
		sinv = sarcinvestigationService.getInvestigationById(id);
		if(sinv.getInvestigationTime() != investigationTime) {
			sinvcargolist = sarcinvestigationService.getInvestigationCargoList(id, 0, sarcinvestigationService.getInvestigationCargoListCount(id));
			for(SarcInvestigationCargo sic : sinvcargolist) {
				sic.setInvestigationTime(investigationTime);
				sarcinvestigationService.saveInvestigationCargo(sic);
			}
		}
		sinv.setSupplierid(ssup.getSupplierid());
		sinv.setInvestigationTime(investigationTime);
		sinv.setType(type);
		sinv.setQualification(qualification);
		sinv.setAddress(address);
		sinv.setPostcode(postcode);
		sinv.setPortal(portal);
		sinv.setPushType(pushType);
		sinv.setPayType(payType);
		sinv.setImprest(imprest);
		sinv.setSettlement(settlement);
		sinv.setCurrency(currency);
		sinv.setTransportType(transportType);
		sinv.setLegalPerson(legalPerson);
		sinv.setContact(contact);
		sinv.setTel(tel);
		sinv.setFax(fax);
		sinv.setMobile(mobile);
		sinv.setEmail(email);
		sinv.setBank(bank);
		sinv.setBankAccount(bankAccount);
		sinv.setTaxCollector(taxCollector);
		sinv.setProperty(property);
		sinv.setRegisterCapital(registerCapital);
		sinv.setFixedAssets(fixedAssets);
		sinv.setEmployee(employee);
		sinv.setManagement(management);
		sinv.setTechnical(technical);
		sinv.setQc(qc);
		sinv.setGroupOutput(groupOutput);
		sinv.setSupplyAbility(supplyAbility);
		sinv.setProcess(process);
		sinv.setProductionEquipment(productionEquipment);
		sinv.setDetectionEquipment(detectionEquipment);
		sinv.setGetApprove(getApprove);
		sinv.setPlanApprove(planApprove);
		sinv.setApproveStandard(approveStandard);
		sinv.setApproveReport(approveReport); 	
		sinv.setIfPushPurchasing(ifPushPurchasing);
		if (!("").equals(taxcertFileName) && taxcertFileName != null) {
			taxationCert = Picfiles.getsrcpic(request, taxcertFileName,
					taxcert, "/upload/cert/", 1000);
			sinv.setTaxationCert(taxationCert);
		}
		if (!("").equals(buscertFileName) && buscertFileName != null) {
			businessCert = Picfiles.getsrcpic(request, buscertFileName,
					buscert, "/upload/cert/", 1000);
			sinv.setBusinessCert(businessCert);
		}
		if (!("").equals(procertFileName) && procertFileName != null) {
			productCert = Picfiles.getsrcpic(request, procertFileName,
					procert, "/upload/cert/", 1000);
			sinv.setProductCert(productCert);
		}
		if (!("").equals(opecertFileName) && opecertFileName != null) {
			operateCert = Picfiles.getsrcpic(request, opecertFileName,
					opecert, "/upload/cert/", 1000);
			sinv.setOperateCert(operateCert);
		}
//		sinv.setTdsCert(tdsCert);
//		sinv.setMsdsCert(msdsCert);
//		sinv.setOtherCert(otherCert);
		sarcinvestigationService.saveOrUpdate(sinv);
		return "updateInvestigation";
	}
	
	public String getInvestigationList() {
		HttpServletRequest request = ServletActionContext.getRequest();
		ssup = TsSessionUtil.getTsUser(request);
		pages = new Pages();
		pages.setAllNum(sarcinvestigationService.getInvestigationListCount(ssup.getSupplierid()));
		if(currentPage == 0) currentPage = 1;
		pages.setCurrentPage(currentPage);
		int pageSize = 20;
		pages.setPageSize(pageSize);
		int pageCount = pages.getPageCount();
		pages.setPageCount(pageCount);//总页数		
		int startIndex = (currentPage - 1) * pageSize;
		sinvlist = sarcinvestigationService.getInvestigationList(ssup.getSupplierid(), startIndex, pageSize);
		return "getInvestigationList";
	}
	
	public String deleteInvestigation() {
		sarcinvestigationService.symbolDelete(SarcInvestigation.class, id);
		return "deleteInvestigation";
	}
	
	public String newInvestigationCargo() {
		HttpServletRequest request = ServletActionContext.getRequest();
		ssup = TsSessionUtil.getTsUser(request);	
		sinv = sarcinvestigationService.getInvestigationById(id);	
		return "newInvestigationCargo";
	}
	
	public String saveInvestigationCargo() {
		HttpServletRequest request = ServletActionContext.getRequest();
		ssup = TsSessionUtil.getTsUser(request);
		sinv = sarcinvestigationService.getInvestigationById(id);	
		sinvcargo = new SarcInvestigationCargo();
		sinvcargo.setSupplierid(ssup.getSupplierid());
		sinvcargo.setInvestigationid(sinv.getInvestigationid());
		sinvcargo.setInvestigationTime(sinv.getInvestigationTime());
		sinvcargo.setName(cargoName);
		sinvcargo.setStandard(cargoStandard);
		sinvcargo.setSupplyCycle(cargoSupplyCycle);
		sinvcargo.setDr(0L);
		sarcinvestigationService.saveInvestigationCargo(sinvcargo);
		boolean flag = sarcReferService.queryReferBySupplierId(ssup.getSupplierid(), cargoName);
		if(flag && cargoName != null && !"".equals(cargoName)) {
			SarcRefer sr = new SarcRefer();
			sr.setSupplierid(ssup.getSupplierid());
			sr.setName(cargoName);
			sarcReferService.saveOrUpdate(sr);
		}
		return "saveInvestigationCargo";
	}
	
	public String editInvestigationCargo() {
		HttpServletRequest request = ServletActionContext.getRequest();
		ssup = TsSessionUtil.getTsUser(request);
		sinvcargo = sarcinvestigationService.getInvestigationCargoById(id);
		return "editInvestigationCargo";
	}
	
	public String updateInvestigationCargo() {
		sinvcargo = sarcinvestigationService.getInvestigationCargoById(oid);
		sinvcargo.setName(cargoName);
		sinvcargo.setStandard(cargoStandard);
		sinvcargo.setSupplyCycle(cargoSupplyCycle);
		sarcinvestigationService.saveInvestigationCargo(sinvcargo);		
		boolean flag = sarcReferService.queryReferBySupplierId(ssup.getSupplierid(), cargoName);
		if(flag && cargoName != null && !"".equals(cargoName)) {
			SarcRefer sr = new SarcRefer();
			sr.setSupplierid(ssup.getSupplierid());
			sr.setName(cargoName);
			sarcReferService.saveOrUpdate(sr);
		}
		return "updateInvestigationCargo";
	}
	
	public String deleteInvestigationCargo() {
		sarcinvestigationService.deleteSarcInvestigationCargo(id);
		return "deleteInvestigationCargo";
	}

	public SarcInvestigationService getSarcinvestigationService() {
		return sarcinvestigationService;
	}

	public void setSarcinvestigationService(
			SarcInvestigationService sarcinvestigationService) {
		this.sarcinvestigationService = sarcinvestigationService;
	}

	public SarcSupplier getSsup() {
		return ssup;
	}

	public void setSsup(SarcSupplier ssup) {
		this.ssup = ssup;
	}

	public List<SarcInvestigation> getSinvlist() {
		return sinvlist;
	}

	public void setSinvlist(List<SarcInvestigation> sinvlist) {
		this.sinvlist = sinvlist;
	}

	public SarcInvestigation getSinv() {
		return sinv;
	}

	public void setSinv(SarcInvestigation sinv) {
		this.sinv = sinv;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getOid() {
		return oid;
	}

	public void setOid(Long oid) {
		this.oid = oid;
	}

	public Long getSupplierid() {
		return supplierid;
	}

	public void setSupplierid(Long supplierid) {
		this.supplierid = supplierid;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Date getInvestigationTime() {
		return investigationTime;
	}

	public void setInvestigationTime(Date investigationTime) {
		this.investigationTime = investigationTime;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getQualification() {
		return qualification;
	}

	public void setQualification(String qualification) {
		this.qualification = qualification;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getPostcode() {
		return postcode;
	}

	public void setPostcode(String postcode) {
		this.postcode = postcode;
	}

	public String getPortal() {
		return portal;
	}

	public void setPortal(String portal) {
		this.portal = portal;
	}

	public String getPushType() {
		return pushType;
	}

	public void setPushType(String pushType) {
		this.pushType = pushType;
	}

	public String getPayType() {
		return payType;
	}

	public void setPayType(String payType) {
		this.payType = payType;
	}

	public Double getImprest() {
		return imprest;
	}

	public void setImprest(Double imprest) {
		this.imprest = imprest;
	}

	public Long getSettlement() {
		return settlement;
	}

	public void setSettlement(Long settlement) {
		this.settlement = settlement;
	}

	public String getCurrency() {
		return currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public String getTransportType() {
		return transportType;
	}

	public void setTransportType(String transportType) {
		this.transportType = transportType;
	}

	public String getLegalPerson() {
		return legalPerson;
	}

	public void setLegalPerson(String legalPerson) {
		this.legalPerson = legalPerson;
	}

	public String getContact() {
		return contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public String getFax() {
		return fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getBank() {
		return bank;
	}

	public void setBank(String bank) {
		this.bank = bank;
	}

	public String getBankAccount() {
		return bankAccount;
	}

	public void setBankAccount(String bankAccount) {
		this.bankAccount = bankAccount;
	}

	public String getTaxCollector() {
		return taxCollector;
	}

	public void setTaxCollector(String taxCollector) {
		this.taxCollector = taxCollector;
	}

	public String getProperty() {
		return property;
	}

	public void setProperty(String property) {
		this.property = property;
	}

	public Double getRegisterCapital() {
		return registerCapital;
	}

	public void setRegisterCapital(Double registerCapital) {
		this.registerCapital = registerCapital;
	}

	public Double getFixedAssets() {
		return fixedAssets;
	}

	public void setFixedAssets(Double fixedAssets) {
		this.fixedAssets = fixedAssets;
	}

	public Long getEmployee() {
		return employee;
	}

	public void setEmployee(Long employee) {
		this.employee = employee;
	}

	public Long getManagement() {
		return management;
	}

	public void setManagement(Long management) {
		this.management = management;
	}

	public Long getTechnical() {
		return technical;
	}

	public void setTechnical(Long technical) {
		this.technical = technical;
	}

	public Long getQc() {
		return qc;
	}

	public void setQc(Long qc) {
		this.qc = qc;
	}

	public String getGroupOutput() {
		return groupOutput;
	}

	public void setGroupOutput(String groupOutput) {
		this.groupOutput = groupOutput;
	}

	public String getSupplyAbility() {
		return supplyAbility;
	}

	public void setSupplyAbility(String supplyAbility) {
		this.supplyAbility = supplyAbility;
	}

	public String getProcess() {
		return process;
	}

	public void setProcess(String process) {
		this.process = process;
	}

	public String getProductionEquipment() {
		return productionEquipment;
	}

	public void setProductionEquipment(String productionEquipment) {
		this.productionEquipment = productionEquipment;
	}

	public String getDetectionEquipment() {
		return detectionEquipment;
	}

	public void setDetectionEquipment(String detectionEquipment) {
		this.detectionEquipment = detectionEquipment;
	}

	public String getGetApprove() {
		return getApprove;
	}

	public void setGetApprove(String getApprove) {
		this.getApprove = getApprove;
	}

	public String getPlanApprove() {
		return planApprove;
	}

	public void setPlanApprove(String planApprove) {
		this.planApprove = planApprove;
	}

	public String getApproveStandard() {
		return approveStandard;
	}

	public void setApproveStandard(String approveStandard) {
		this.approveStandard = approveStandard;
	}

	public String getApproveReport() {
		return approveReport;
	}

	public void setApproveReport(String approveReport) {
		this.approveReport = approveReport;
	}

	public Byte getIfPushPurchasing() {
		return ifPushPurchasing;
	}

	public void setIfPushPurchasing(Byte ifPushPurchasing) {
		this.ifPushPurchasing = ifPushPurchasing;
	}

	public Byte getAuditState() {
		return auditState;
	}

	public void setAuditState(Byte auditState) {
		this.auditState = auditState;
	}

	public Date getAuditTime() {
		return auditTime;
	}

	public void setAuditTime(Date auditTime) {
		this.auditTime = auditTime;
	}

	public String getAuditPerson() {
		return auditPerson;
	}

	public void setAuditPerson(String auditPerson) {
		this.auditPerson = auditPerson;
	}

	public String getTaxationCert() {
		return taxationCert;
	}

	public void setTaxationCert(String taxationCert) {
		this.taxationCert = taxationCert;
	}

	public File getTaxcert() {
		return taxcert;
	}

	public void setTaxcert(File taxcert) {
		this.taxcert = taxcert;
	}

	public String getTaxcertFileName() {
		return taxcertFileName;
	}

	public void setTaxcertFileName(String taxcertFileName) {
		this.taxcertFileName = taxcertFileName;
	}

	public Date getTaxationEndtime() {
		return taxationEndtime;
	}

	public void setTaxationEndtime(Date taxationEndtime) {
		this.taxationEndtime = taxationEndtime;
	}

	public String getBusinessCert() {
		return businessCert;
	}

	public void setBusinessCert(String businessCert) {
		this.businessCert = businessCert;
	}

	public File getBuscert() {
		return buscert;
	}

	public void setBuscert(File buscert) {
		this.buscert = buscert;
	}

	public String getBuscertFileName() {
		return buscertFileName;
	}

	public void setBuscertFileName(String buscertFileName) {
		this.buscertFileName = buscertFileName;
	}

	public Date getBusinessEndtime() {
		return businessEndtime;
	}

	public void setBusinessEndtime(Date businessEndtime) {
		this.businessEndtime = businessEndtime;
	}

	public String getProductCert() {
		return productCert;
	}

	public void setProductCert(String productCert) {
		this.productCert = productCert;
	}

	public File getProcert() {
		return procert;
	}

	public void setProcert(File procert) {
		this.procert = procert;
	}

	public String getProcertFileName() {
		return procertFileName;
	}

	public void setProcertFileName(String procertFileName) {
		this.procertFileName = procertFileName;
	}

	public Date getProductEndtime() {
		return productEndtime;
	}

	public void setProductEndtime(Date productEndtime) {
		this.productEndtime = productEndtime;
	}

	public String getOperateCert() {
		return operateCert;
	}

	public void setOperateCert(String operateCert) {
		this.operateCert = operateCert;
	}

	public File getOpecert() {
		return opecert;
	}

	public void setOpecert(File opecert) {
		this.opecert = opecert;
	}

	public String getOpecertFileName() {
		return opecertFileName;
	}

	public void setOpecertFileName(String opecertFileName) {
		this.opecertFileName = opecertFileName;
	}

	public Date getOperateEndtime() {
		return operateEndtime;
	}

	public void setOperateEndtime(Date operateEndtime) {
		this.operateEndtime = operateEndtime;
	}

	public String getTdsCert() {
		return tdsCert;
	}

	public void setTdsCert(String tdsCert) {
		this.tdsCert = tdsCert;
	}

	public Date getTdsEndtime() {
		return tdsEndtime;
	}

	public void setTdsEndtime(Date tdsEndtime) {
		this.tdsEndtime = tdsEndtime;
	}

	public String getMsdsCert() {
		return msdsCert;
	}

	public void setMsdsCert(String msdsCert) {
		this.msdsCert = msdsCert;
	}

	public Date getMsdsEndtime() {
		return msdsEndtime;
	}

	public void setMsdsEndtime(Date msdsEndtime) {
		this.msdsEndtime = msdsEndtime;
	}

	public String getOtherCert() {
		return otherCert;
	}

	public void setOtherCert(String otherCert) {
		this.otherCert = otherCert;
	}

	public Date getOtherEndtime() {
		return otherEndtime;
	}

	public void setOtherEndtime(Date otherEndtime) {
		this.otherEndtime = otherEndtime;
	}

	public Date getAddTime() {
		return addTime;
	}

	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	public Date getFinishTime() {
		return finishTime;
	}

	public void setFinishTime(Date finishTime) {
		this.finishTime = finishTime;
	}

	public String getDef1() {
		return def1;
	}

	public void setDef1(String def1) {
		this.def1 = def1;
	}

	public String getDef2() {
		return def2;
	}

	public void setDef2(String def2) {
		this.def2 = def2;
	}

	public String getDef3() {
		return def3;
	}

	public void setDef3(String def3) {
		this.def3 = def3;
	}

	public String getDef4() {
		return def4;
	}

	public void setDef4(String def4) {
		this.def4 = def4;
	}

	public String getDef5() {
		return def5;
	}

	public void setDef5(String def5) {
		this.def5 = def5;
	}

	public String getDef6() {
		return def6;
	}

	public void setDef6(String def6) {
		this.def6 = def6;
	}

	public String getDef7() {
		return def7;
	}

	public void setDef7(String def7) {
		this.def7 = def7;
	}

	public String getDef8() {
		return def8;
	}

	public void setDef8(String def8) {
		this.def8 = def8;
	}

	public String getDef9() {
		return def9;
	}

	public void setDef9(String def9) {
		this.def9 = def9;
	}

	public Date getTs() {
		return ts;
	}

	public void setTs(Date ts) {
		this.ts = ts;
	}

	public Long getDr() {
		return dr;
	}

	public void setDr(Long dr) {
		this.dr = dr;
	}

	public List<SarcInvestigationCargo> getSinvcargolist() {
		return sinvcargolist;
	}

	public void setSinvcargolist(List<SarcInvestigationCargo> sinvcargolist) {
		this.sinvcargolist = sinvcargolist;
	}

	public SarcInvestigationCargo getSinvcargo() {
		return sinvcargo;
	}

	public void setSinvcargo(SarcInvestigationCargo sinvcargo) {
		this.sinvcargo = sinvcargo;
	}

	public String getCargoName() {
		return cargoName;
	}

	public void setCargoName(String cargoName) {
		this.cargoName = cargoName;
	}

	public String getCargoCode() {
		return cargoCode;
	}

	public void setCargoCode(String cargoCode) {
		this.cargoCode = cargoCode;
	}

	public String getCargoStandard() {
		return cargoStandard;
	}

	public void setCargoStandard(String cargoStandard) {
		this.cargoStandard = cargoStandard;
	}

	public String getCargoSupplyCycle() {
		return cargoSupplyCycle;
	}

	public void setCargoSupplyCycle(String cargoSupplyCycle) {
		this.cargoSupplyCycle = cargoSupplyCycle;
	}

	public Pages getPages() {
		return pages;
	}

	public void setPages(Pages pages) {
		this.pages = pages;
	}

	public int getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}

	public SarcReferService getSarcReferService() {
		return sarcReferService;
	}

	public void setSarcReferService(SarcReferService sarcReferService) {
		this.sarcReferService = sarcReferService;
	}

	
}
